import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dings
 * Date: 2024-07-02
 * Time: 17:07
 */

class Animal {

}
class Dog extends Animal {

}
public class Test {
    public static void main(String[] args) {
        ArrayList<Animal> list = new ArrayList<>();

        list.add(new Animal());
        list.add(new Dog());//数据具备继承性  1
    }

    public static void main1(String[] args) {
        ArrayList<Dog> listDog = new ArrayList<>();
        ArrayList<Animal> listAnimal = new ArrayList<>();
        //test1(listDog);
        test1(listAnimal);
    }

    public static void test1(ArrayList<Animal> list) {

    }
}
